<template>
  <div>
    <h1>Home组件</h1>
    <router-link to="/home/music">music</router-link>
    <router-link to="/home/news">news</router-link>
    <hr />
    <!-- 缓存路由vue3写法 -->
    <router-view v-slot="{ Component }">
        <keep-alive>
          <component :is="Component" />
        </keep-alive>
    </router-view>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "Home",
});
</script>

<script setup lang="ts"></script>
